package com.sfpay.merchant.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sfpay.merchant.auth.entity.system.SysRole;

import java.util.List;

/**
 * <p>
 * 角色信息表 Mapper 接口
 * </p>
 *
 * @author fangchen
 * @since 2022-07-15
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {

    List<SysRole> selectRolesByUserId(Long userId);

    List<SysRole> selectRoleList(SysRole role);

    SysRole checkRoleNameUnique(String roleName);

    SysRole checkRoleKeyUnique(String roleKey);

    void insertRole(SysRole role);

    SysRole selectRoleById(Long roleId);

    void updateRole(SysRole role);

    int deleteRoleByIds(Long[] roleIds);
}
